import 'package:enter_prise_web/models/user.dart';


class group {
  final String? gid;
  final String? groupName;
  final String? viewName;

  static List<Users> items = [
    Users(gid: "1000",username: "管理员",uid: "11",groupName: "管理员组"),
    Users(gid: "1001", username: "李信成", uid: "12", groupName: "裁剪车间"),
    Users(gid: "1002", username: "苗仁豪", uid: "13", groupName: "张送真"),
  ];
  group({this.gid, this.groupName, this.viewName});
  //根据gid如10001转化为对应的groupName如张送真组

  static final Map<String, String> _gidMapping = {
    "1000": "管理员组",
    "1001": "裁剪车间",
    "1002": "张送真",
    "1003": "包装组",
    "1005": "销售员",
    "1006": "刘洋",
  };

  static final Map<String, String> _GroupMapping = {
    "管理员组": "1000",
    "裁剪车间": "1001",
    "张送真": "1002",
    "包装组": "1003",
    "销售员": "1005",
    "刘洋": "1006",
  };
  static String? getGroupName(String gid) {
    return _gidMapping[gid];
  }
  static String? getGid(String groupName) {
    return _GroupMapping[groupName];
  }
}
